package me.aartikov.alligator.animations;


import me.aartikov.alligator.util.Log;
import me.aartikov.alligator.helpers.DialogFraction;

/**
 * Dialog animation that uses a window animation style resource.
 */
public class SimpleDialogAnimation implements DialogAnimation {
//    private int mWindowAnimationsStyleRes;

    /**
     * @param windowAnimationsStyleRes window animation style resource
     *                                 <pre>{@code For example:
     *
     */
    public SimpleDialogAnimation(int windowAnimationsStyleRes) {
//        mWindowAnimationsStyleRes = windowAnimationsStyleRes;
    }

    @Override
    public void applyBeforeShowing(DialogFraction dialogFragment) {
    }

    @Override
    public void applyAfterShowing(DialogFraction dialogFragment) {
        if (dialogFragment.getDialog() != null && dialogFragment.getDialog().getWindow() != null) {
            //TODO 给window设置一个动画
            Log.e("未完成", "给window设置一个动画");

//			dialogFragment.getDialog().getWindow().setWindowAnimations(mWindowAnimationsStyleRes);

//			AnimatorScatter instance = AnimatorScatter.getInstance(dialogFragment.getFractionAbility());
//			Animator animator = instance.parse(mWindowAnimationsStyleRes);
//			Log.d("TAG", "animator :" + (animator instanceof AnimatorValue));
//			WindowManager.LayoutConfig layoutConfig = dialogFragment.getDialog().getWindow().getLayoutConfig().get();
        }
    }
}
